package ru.xpparty.scanner;

import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: vanger
 * Date: 19.12.10
 * Time: 17:43
 * To change this template use File | Settings | File Templates.
 */
public class ReportGenerator {
    public static String createReport(Map<Host, ResultEnum> inputData) {
        StringBuffer report = new StringBuffer();
        for (Map.Entry<Host, ResultEnum> entry : inputData.entrySet()) {
            report.append(entry.getKey());
            switch (entry.getValue()) {
                case OPENED:
                    report.append(" opened");
                    break;
                case CLOSED:
                    report.append(" closed");
                    break;
                case INVALID:
                    report.append(" invalid");

            }
            report.append("\n");
        }
        return report.toString();

    }
}
